package com.efast.dmom.mgmt.controller.mes;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.mes.DeleteInBatchesFunctionBean;
import com.efast.dmom.mgmt.service.mes.DeleteInBatchesFunctionService;

/**
 * 批量删除的通用功能
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/delete")
public class DeleteInBatchesFunctionController {
	
	@Autowired
	private DeleteInBatchesFunctionService deleteInBatchesFunctionService;
	
	//通过表名、字段名实现批量删除方法
	@RequestMapping(value="/deleteInBatchesFunction")
    public @ResponseBody ResultBean deleteInBatchesFunction(@RequestBody DeleteInBatchesFunctionBean deleteData){
	    ResultBean result=new ResultBean(true,"'");
	    deleteInBatchesFunctionService.deleteInBatchesFunction(deleteData);
		return result;			
		}
	
	// 校验售后质量数据全校验
	@RequestMapping(value="/validateAddAfterQualityData")
	public @ResponseBody ResultBean validateAddData(@RequestBody Map<String,Object> map){
	    ResultBean validateAddAfterQualityData = deleteInBatchesFunctionService.validateAddAfterQualityData(map);
		return validateAddAfterQualityData;
		}

}
